Sub prueba_FreeFile()
    Dim fichero As String
    Dim texto As String
    Dim numero As Variant
    numero = FreeFile
    texto = "Es una prueba de FreeFile"
    fichero = "C:\Temp\NotasFreeFile.txt"
    Open fichero For Output As #numero
    ' Graba datos en fichero.
    Print #numero, texto
    ' Cierra fichero.
    Close
End Sub
